home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / QuickDraw GX / Programming Stuff / Sample Code / Graphics Samples / Graphics Samples Notes 1.1.3
Encoding:
Text File  |  1996-05-08  |  6.9 KB  |  106 lines  |  [TEXT/ttxt]

  1.  
  2. Graphics Samples Notes 1.1.3
  3. 7 May 1996
  4.  
  5.  
  6. This release note gives a brief description of how the sample graphics applications work, and a few tips about re-building the samples.  
  7.  
  8. The files contained in this folder are sample applications which demonstrate some of the uses and capabilities of the QuickDraw GX graphics system. All of the samples included are designed to be compiled under Think C 7.0.6 (or later) or MPW v3.4 (or later) using the universal interfaces 2.1. Think C v7.0.6 "Project" files are included for each sample application. For the projects files to compile properly, you'll need to drag the "QuickDraw™ GX Libraries" and "QuickDraw™ GX Interfaces" folders into the Think v7.x "projects" folder (or distribute their files appropriately).
  9.  
  10. If you have installed the "GXGraphics (debug)" extension to enable the extensive QuickDraw GX error handling capabilities, at times, you might find yourself in the debugger, with a "GRAPHICS NOTICE:_____". If this occurs, the GX system is telling you that the application is performing a task which might be avoided. You can continue past these debugger warnings (use "G" in MacsBug). By the way, you will only receive a notice if you are running the "debugging" version of the QuickDraw GX init.
  11.  
  12.  
  13. Brief Descriptions:
  14.  
  15. • 3 Circles (hit testing)
  16. This sample demonstrates the hit testing capabilities of the QuickDraw GX system. The app draws 3 circles. A user can select a circle and drag it around. An off-screen bitmap is used to redraw the windows contents. Each circle uses a transfer mode to provide color mixing as the users over laps each circle.
  17.  
  18. • All Shapes
  19. This sample creates all of the GX graphics primitive shapes.
  20.  
  21. • Bitmap Shape with Clip
  22. This application retrieves a bitmap shape from it's resource fork and applies a text shape clip to the bitmap shape. 
  23.  
  24. • Bouncing Bitmap
  25. This sample demonstrates the capabilities of the graphics system to manipulate and draw bitmaps. Each time the bitmap is drawn, it location's will change, and the object will be rotated. If the object hits the edge of the window, it will bounce back.
  26.  
  27. • Caps Attached To a Curve
  28. We create a curve and attach a cap to each end.
  29.  
  30. • Dashing Text
  31. Dashes a line of text along a curve.
  32.  
  33. • Getting Started w/QD GX
  34. This application was used during the "Getting Started With QuickDraw GX" WWDC '93 session.
  35.  
  36. • GXOffscreens, GWorlds, Movies
  37. This application uses the QuickDraw GX offscreen library, QuickDraw's GWorlds, and QuickTime v1.6 to play a QuickTime movie and rotate it with QuickDraw GX.
  38.  
  39. • Grayscale Bitmap
  40. We create a 1 pixel high by 256 pixel bitmap and assign a gray value to each pixel. We will the use ScaleShape to scale the bitmap shape by 40 in the y direction.
  41.  
  42. • House Picture
  43. This sample demonstrates the picture creation capabilities of the graphics system.  We create a picture of a house by adding 7 different shapes to the picture.  Each shape has a different size, color, and style.
  44.  
  45. • Mode
  46. This sample allows you to change the transfer mode that is used to draw the text on top of a colored background.  It will also allow you to set the color and type of updating used by the application.  NOTE: On occasion, pixels may remain on the screen from the spinning text.  This reflects the pre-alpha state.
  47.  
  48. • Offscreen Animation
  49. Uses the QuickDraw GX offscreen library to simulate rectangles flying through space.
  50.  
  51. • One Rectangle
  52. Creates a black rectangle.
  53.  
  54. • Paths & Frames
  55. This sample demonstrates the framing capabilities of the graphics system.  We create a shape containing a letter, rectangle, and a oval.  We will then draw the shape in a different colors and frames.
  56.  
  57. • Patterned Curve
  58. We create a "thick" curve and fill it with a star pattern.
  59.  
  60. • Pen Play
  61. Creates various paths, and adjusts the pen size and location (i.e. the pen placed: on, inset, and outside of the geometry of the shape).
  62.  
  63. • Perspective Bitmap
  64. This sample application retrieves a pixmap and converts it to a shape.  We will then run the shape through a transform which will skew it, when drawn.
  65.  
  66. • QDGX Debugging (WWDC'94)
  67. this application creates a picture containing 5 shapes (2 text shapes, 2 paths, and a rectangle). This is the same code used during the "Using QuickDraw GX in QuickDraw Applications & Debugging Tips" WWDC '94 session.
  68.  
  69. • Rotating Rects
  70. This sample application will create a rectangle the size of the window.  It will then rotate, scale, and color the rectangle before re-drawing it.  The color is derived from the hsv color space.
  71.  
  72. • ShapePart Browser
  73. This application displays several types of shapes with various features.  Beside these are series of check boxes corresponding to all the shape parts recognized by the routine HitTestShape.  As the cursor is positioned over each shape the parts hit-tested by the given point are highlighted on the corresponding check boxes.  Unchecking a check box keeps the shape part from being tested. Since the glyph (and text) shape cannot have an edge, join, start or end cap these bits of the shape part field are interpreted differently by the graphics system to mean glyph bounds, glyph first, glyph last and side bearings instead. The Metrics menu allows the shape's bounding boxes (command-B) and control points (command-P) to be shown.  The cursor may be moved automatically (command-M) until the mouse is moved again by the user.
  74.  
  75. • Spectacle
  76. This sample application demonstrates the capabilities of viewPorts. The app creates a viewPort grid, each viewPort contains a different dither, halftone, or scaling.
  77.  
  78. • Spinning Colored Ovals
  79. This sample creates an oval slightly smaller than the window.  We will then rotate and color each oval.  The oval is drawn twice.  Once for the outside oval, and the second time to fill the inside oval.  The oval is colored in an hsv color. 
  80.  
  81. • Spinning Text
  82. This sample application will create a string of text and rotate it, and color it with an hsv color.
  83.  
  84. • TestCubics
  85. This sample converts a cubic Bezier to a quadratic Bezier using the "Cubic Library". Click on three locations within the window to define the points which represent the curve. You have the ability to set the amount of error and the number of points used for the conversion via the menus.
  86.  
  87. • Text To Outlines
  88. Creates a text shapes and converts it to a path shape. The path shape will then contain the outlines of each character of the original string we had created.
  89.  
  90. • viewPort Mania
  91. This sample demonstrates the multiple viewPort capabilities of the new graphics system.  We create 6 child viewPorts and attach them to the parent viewPort of the window.  We will then change the attributes of each viewPort, which allows the shape to be drawn to the particular viewPort in a different color space, scale, or halftone.  We will then draw the same shape simultaneously to all of the viewPorts. 
  92.  
  93.  
  94.  
  95.  
  96.  
  97. All files contained in this folder are:
  98. ©Copyright 1992 - 1996 Apple Computer, Inc. All rights reserved.  
  99. THINK C is a registered trademark of the Symantec Corporation
  100.  
  101. (5/7/96 IK)
  102. (4/15/96 BOB)
  103. (7/11/95 DH)
  104. (5/2/94 PLA)
  105.  
  106.